package com.egao.gps.quartz;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author : Doman
 * @version ：1.0
 * @date : 2020-02-07 14:04
 */
@Component
public class JKXStartupRunner implements CommandLineRunner {

    @Autowired
    public JKXCronSchedulerJob scheduleJobs;
    @Value("${runwithmodel}")
    private String runwithmodel;

    public static  String runwithmodel2;

    @Override
    public void run(String... args) throws Exception {
        //dev prod test
        runwithmodel2 = runwithmodel;
        if (runwithmodel.equals("prod")) {
//        if (runwithmodel.equals("prod") || runwithmodel.equals("dev")) {
//            scheduleJobs.scheduleJobs();
        }
        System.out.println(">>>>>>>>>>>>>>>定时任务开始执行 每天执行一次<<<<<<<<<<<<<");
    }


}